﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ClassLibrary1;

namespace WebApplication1.Business
{
    public class UserBusiness
    {
        private Users users = new Users();
        public void CreatAcc(string user, string pass, string first, string last, string dob, bool gen, int phone, string address, string email,bool type)
        {
            users.CreateAcc(user, pass, first, last, dob, gen, phone, address, email,type);
        }

        public bool Check(string userid, string pass, bool type)
        {
            return users.CheckLogin(userid, pass, type);
        }

        public bool CheckCreat(string user)
        {
            if (user.Length != 0)
            {
                return users.CheckCreat(user);
            }
            return false;
        }

        public User GetUser(string id)
        {
            return users.GetUserByID(id);
        }

    }
}
